package com.xc.ezplan.admin.vo;

import com.baomidou.mybatisplus.core.conditions.update.Update;
import com.xc.ezplan.admin.entity.AdminDept;
import com.xc.ezplan.admin.entity.AdminJob;
import com.xc.ezplan.admin.entity.AdminRole;
import com.xc.ezplan.core.base.BaseVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * @author lixingchen
 * @date 2022/11/19
 * @description 后台用户VO
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class AdminUserVo extends BaseVo {
    @NotNull(groups = Update.class)
    @ApiModelProperty(value = "用户ID", hidden = true)
    private Long id;

    @ApiModelProperty(value = "用户角色ID")
    private List<Long> roleIds;

    @ApiModelProperty(value = "用户岗位ID")
    private List<Long> jobIds;

    @ApiModelProperty(value = "用户部门ID")
    private Long deptId;

    @ApiModelProperty(value = "用户角色列表")
    private List<AdminRole> roleList;

    @ApiModelProperty(value = "用户岗位列表")
    private List<AdminJob> jobList;

    @ApiModelProperty(value = "用户部门列表")
    private List<AdminDept> deptList;

    @NotBlank
    @ApiModelProperty(value = "用户名称")
    private String username;

    @ApiModelProperty(value = "用户昵称")
    private String nickName;

    @Email
    @NotBlank
    @ApiModelProperty(value = "邮箱")
    private String email;

    @NotBlank
    @ApiModelProperty(value = "电话号码")
    private String phone;

    @ApiModelProperty(value = "用户性别")
    private String gender = "男";

    @ApiModelProperty(value = "头像真实名称",hidden = true)
    private String avatarName;

    @ApiModelProperty(value = "头像存储的路径", hidden = true)
    private String avatarPath;

    @ApiModelProperty(value = "密码")
    private String password;

    @NotNull
    @ApiModelProperty(value = "是否启用")
    private Boolean enabled =true;

    @ApiModelProperty(value = "是否为admin账号", hidden = true)
    private Boolean isAdmin = false;

    @ApiModelProperty(value = "最后修改密码的时间", hidden = true)
    private Date pwdResetTime;
}
